package core.util;

public class PageText {

	private static final String docType = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 "
			+ "Transitional//EN\">\n";

	private static final String HOME_PAGE_FORMAT = "<html><body>"
			+ "<title>cs 5300 Project 1</title><br>&nbsp;<br>"
			+ "Server Name is : %s<br>"
			+ "%s::%d<br>"
			+ "<big><b>(%s)&nbsp;&nbsp;%s<br>&nbsp;<br></b></big>"
			+ "<form method=GET action='replace'>"
			+ "<input type='submit' name='cmd' value='Replace'/>&nbsp;&nbsp;"
			+ "<input type=text name=NewText size=40 maxlength=512 />&nbsp;&nbsp;"
			+ "</form><br>"
			+ "<form method=GET action='home'><input type='submit' value='Refresh' /></form><br>"
			+ "<form method=GET action='logout'><input type='submit' name='cmd' value='Log Out' /></form>"
			+ "</body></html>";

	public static String getHomeHTML(String serverId, String inetAddr,
			int port, int displayCount, String displayMessage) {
		return docType
				+ String.format(HOME_PAGE_FORMAT, serverId, inetAddr, port,
						displayCount, displayMessage);
	}
}
